<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2021/5/8
  Time: 19:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>POS Dash | Responsive Bootstrap 4 Admin Dashboard Template</title>

    <!-- Favicon -->
    <link rel="shortcut icon" href="/boot/llr/images/favicon.ico" />
    <link rel="stylesheet" href="/boot/llr/css/backend-plugin.min.css">
    <link rel="stylesheet" href="/boot/llr/css/backend.css?v=1.0.0">
    <link rel="stylesheet" href="/boot/llr/vendor/@fortawesome/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="/boot/llr/vendor/line-awesome/dist/line-awesome/css/line-awesome.min.css">
    <link rel="stylesheet" href="/boot/llr/vendor/remixicon/fonts/remixicon.css">
</head>
<body>

<!-- loader Start -->
<div id="loading">
    <div id="loading-center">
    </div>
</div>
<div class="wrapper">

    <div class="iq-sidebar  sidebar-default ">
        <div class="iq-sidebar-logo d-flex align-items-center justify-content-between">
            <a href="index.jsp" class="header-logo">
                <img src="/boot/llr/images/logo.png" class="img-fluid rounded-normal light-logo" alt="logo"><h5 class="logo-title light-logo ml-3">POSDash</h5>
            </a>
            <div class="iq-menu-bt-sidebar ml-0">
                <i class="las la-bars wrapper-menu"></i>
            </div>
        </div>

        <%--          导入左侧菜单栏--%>
        <%@ include file="/WEB-INF/jsp/Common/leftMenu.jsp"%>


    </div>
    <div class="iq-top-navbar">
        <div class="iq-navbar-custom">
            <nav class="navbar navbar-expand-lg navbar-light p-0">


            </nav>
        </div>
    </div>
    <div class="modal fade" id="new-order" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-body">
                    <div class="popup text-left">
                        <h4 class="mb-3">New Order</h4>
                        <div class="content create-workform bg-body">
                            <div class="pb-3">
                                <label class="mb-2">Email</label>
                                <input type="text" class="form-control" placeholder="Enter Name or Email">
                            </div>
                            <div class="col-lg-12 mt-4">
                                <div class="d-flex flex-wrap align-items-ceter justify-content-center">
                                    <div class="btn btn-primary mr-4" data-dismiss="modal">Cancel</div>
                                    <div class="btn btn-outline-primary" data-dismiss="modal">Create</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>      <div class="content-page">
    <div class="container-fluid add-form-list">
        <div class="row">
            <div class="col-sm-12">
                <div class="card">
                    <div class="card-header d-flex justify-content-between">
                        <div class="header-title">
                            <h4 class="card-title">编辑车辆信息</h4>
                        </div>
                    </div>
                    <div class="card-body">
                        <form action="page-list-product.jsp" data-toggle="validator">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>车辆品牌 *</label>
                                        <select name="type" id="carBrands" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                            <c:forEach items="${brandsList}" var="t">
                                            <option <c:if test="${carDetails.brId == t.id}">selected</c:if>  value="${t.id}">${t.brName}</option>
                                            </c:forEach>
                                        </select

                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>车系 *</label>
                                        <select name="type" id="carstyle" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                            <option value="-1">车系名称</option>
                                            <c:forEach items="${carStylesList}" var="c">
                                            <option <c:if test="${carDetails.stId == c.id}">selected</c:if> value="${c.id}">${c.stName}</option>
                                            </c:forEach>
                                        </select>
                                        <%--                                        <input type="text" class="form-control" placeholder="Enter Name" data-errors="Please Enter Name." required>--%>
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>价钱 *</label>
                                        <input type="text" value="${carDetails.cOprice}" id="price" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>座位数 *</label>
                                        <input type="text" value="${carDetails.cSeat}" id="seat" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>里程数 *</label>
                                        <input type="text" value="${carDetails.cMileage}" id="mile" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>变速箱 *</label>
                                        <input type="text" value="${carDetails.cGear}" id="gear" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px">
                                    </div>
                                </div>

                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>保险日期 *</label>
                                        <input type="date" value="${carDetails.cInsure}"id="time" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px"   />
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>上牌日期 *</label>
                                        <input type="date" value="${carDetails.cRegistration}" id="startime" style="width: 30%;border-radius: 10px;border: solid 1px #DCDFE8;height: 45px" />
                                        <div class="help-block with-errors"></div>
                                    </div>
                                </div>
<%--                                <div class="col-md-12">--%>
<%--                                    <div class="form-group">--%>
<%--                                        <label>图片</label>--%>
<%--                                        <input type="file" value="${carDetails.cPhoto}"id="carPicture" class="form-control image-file" name="pic" accept="image/*">--%>
<%--                                    </div>--%>
<%--                                </div>--%>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>车辆详情</label>
                                        <textarea id="descript" placeholder="${carDetails.cDesc}"class="form-control" rows="4"></textarea>
                                    </div>
                                </div>
                            </div>
                            <button type="button" onclick="Good(${id})" class="btn btn-primary mr-2" style="margin-left: 10px">确认</button>
                            <button type="reset" class="btn btn-danger"><a href="/boot/user/list" style="color: white">返回</a></button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <!-- Page end  -->
    </div>
</div>
</div>
<!-- Wrapper End-->
<footer class="iq-footer">
    <div class="container-fluid">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-lg-6">
                        <ul class="list-inline mb-0">
                            <li class="list-inline-item"><a href="../backend/privacy-policy.html">隐私政策</a></li>
                            <li class="list-inline-item"><a href="../backend/terms-of-service.html">使用条款</a></li>
                        </ul>
                    </div>
                    <div class="col-lg-6 text-right">
                        <span class="mr-1"><script>document.write(new Date().getFullYear())</script>©</span> <a href="#" class="">首页</a>.
                    </div>
                </div>
            </div>
        </div>
    </div>
</footer>

<script language="javascript" type="text/javascript" src="/boot/llr/js/My97DatePicker/WdatePicker.js"> </script>

<script src="/boot/llr/js/backend-bundle.min.js"></script>.

<script src="/boot/llr/js/table-treeview.js"></script>

<script src="/boot/llr/js/customizer.js"></script>

<script async src="/boot/llr/js/chart-custom.js"></script>

<script src="/boot/llr/js/app.js"></script>
<script>
    function Good(id) {
        let carBrands=$("#carBrands").val();
        let carstyle=$("#carstyle").val();
        let price=$("#price").val();
        let seatnum=$("#seat").val();
        let mile=$("#mile").val();
        let speed=$("#gear").val();
        let time=$("#time").val();
        let startime=$("#startime").val();

        let descript=$("#descript").val();
        window.location="/boot/user/edit2?carBrands="+carBrands+"&carstyle="+carstyle+"&price="+price+"&seatnum="+seatnum
            +"&mile="+mile+"&speed="+speed+"&time="+time+"&startime="+startime+"&descript="+descript+"&id="+id;
    }

</script>
</body>
</html>
